require 'gamifier/model'

module Gamifier
  class RewardDefinition < Model
    def encode(key, value)
      case key
      when :components
        MultiJson.dump(value)
      else
        super(key,value)
      end
    end
  end
end
